1. Field of the Invention
The present invention relates generally to an image coding method and device that are used for compressing and encoding image data when the data are recorded or transmitted.
2. Related Background Art
Though there are minor differences in image compressing methods according to whether targets are motion pictures or still pictures, many image compressing methods, for instance, the MPEG2 (motion picture expert group second version) method employed in the digital television broadcasting and the like, and the JPEG (joint photographic experts group) commonly employed in digital still cameras, basically deal with images in a state of being divided into blocks. To obtain the highest-possible-quality decoded images with the smallest possible number of codes, various proposals have been made conventionally. To obtain the high image quality in these image compressing methods is, in other words, to discover an optimal solution to a problem of how much among a limited amount of codes should be allocated at which portions on an image. Therefore, image compressing devices with high quality as their characteristic have taken an approach in which features of images are detected in each of the divided blocks and an optimal coding calculation is applied to each. More specifically, in a quantization means as the most basic means in compression calculations, a quantization step is set to be smaller with respect to a block that is considered to have a greater significance, while, in contrast, a quantization step is set to be greater with respect to a block that is considered to have a smaller significance. Thus, by weighting blocks, the optimization of the code amount allocation on a screen has been attempted.
However, in the case where coding parameters such as quantization steps are varied according to the blocks, a problem arises in that data cannot be decoded correctly unless information on coding parameters used when the data are compressed is included in the compressed data when the compressed data are recorded or transmitted. While the subtle control of coding parameters makes it possible to obtain high-quality images, it also increases an amount of additional parameter information to be included. Therefore, it is necessary to determine an appropriate method with a trade-off of the both taken into consideration. Furthermore, in the case where, as in the MPEG2, the international standards provide that a singularity of a quantization step is used with respect to a macro block integrating a plurality of blocks, the plurality of blocks included in the macro block are processed always by the same quantization step. This makes it impossible to carry out a delicate optimal control with respect to each block, which has been considered as a problem.